package com.study.jyg.rxjava2study.activity;

import android.Manifest;
import androidx.appcompat.widget.Toolbar;
import android.widget.TextView;

import com.study.jyg.rxjava2study.R;
import com.study.jyg.rxjava2study.base.BasicActivity;
import com.study.jyg.rxjava2study.utils.RxPermissionUtil;

public class SignatureActivity extends BasicActivity {


    @Override
    protected boolean isWithoutUseStatusBarColor() {
        return false;
    }

    @Override
    protected int getStatusBarColor() {
        return R.color.colorWhite;
    }

    @Override
    protected int getLayout() {
        return R.layout.activity_signature;
    }

    @Override
    protected void initView() {
        Toolbar toolbar = findViewById(R.id.toolBar);
        TextView tvTitle = findViewById(R.id.tvTitle);
        setSupportActionBar(toolbar);
        toolbar.setNavigationOnClickListener(v -> finish());
        tvTitle.setText("开处方");
        findViewById(R.id.btnSubmit).setOnClickListener(v -> {
            RxPermissionUtil.initPermission(SignatureActivity.this, 1001, new RxPermissionUtil.RxPermissionListener() {
                @Override
                public void isApply() {
                    startActivity(SignatureWriteActivity.class);
                }
            }, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE);

        });

    }
}